<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <p:panel style="height: 2px;"  rendered="#{!managerLayout.desabilitarMapa() and managerCriarImovel.connect}" >
                <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true" />
            </p:panel>

            <h3 class="title">Boletim de Cadastro Imobiliário</h3>
            <style>
                .ui-tabs .ui-tabs-nav.ui-widget-header li.ui-state-active a, 
                .ui-tabs .ui-tabs-nav.ui-widget-header li.ui-state-active a {
                    background-color: #69B8EA !important;
                    background-image: -moz-linear-gradient(center top , #69B8EA, #69B8EA) !important;
                    color: #FFFFFF !important;
                    width: 89%;
                }
            </style> 
            <h:form id="realtyForm" enctype="multipart/form-data">
                <p:growl id="messages" showDetail="false" autoUpdate="true"  />
                <hr/>
                <p:tabView id="tabView"  orientation="left" onTabChange="processPanelGaleria(); atualizarVisaoInscricao();">
                    <p:tab id="tabf" title="Dados Gerais">

                        <h5 class="title">Dados Gerais</h5>
                        <fieldset>
                            <legend>Inscrição Cadastral</legend>

                            <p:panel id="realtyPanel" styleClass="container_24 clearfix withoutBorder">

                                <p:outputLabel value="Inscrição Imóvel" styleClass="grid_5 inscricaoLabelImovel" for="maskinscricao" />
                                <p:inputMask mask="?99.99.999.9999.99" id="maskinscricao" 
                                             styleClass="grid_6"  value="#{managerCriarImovel.visaoInscricao}">
                                    <p:ajax event="change" listener="#{managerCriarImovel.getVisaoInscricao}" />
                                </p:inputMask>
                                <p:watermark value="DD.SS.QUADR.LOTE.UN" for="maskinscricao" />

                            </p:panel>

                            <p:remoteCommand name="atualizarVisaoInscricao" process=":realtyForm:tabView:maskinscricao"/>
                        </fieldset>

                        <fieldset>
                            <legend>Contribuinte</legend>
                            <p:panel id="proprietarioPanel" styleClass="container_24 clearfix">

                                <div style="float: left;width: 100%;margin-bottom: 10px">
                                    <p:outputLabel value="Proprietário" styleClass="grid_3 labelProprietario" for="proprietario"/>
                                    <p:autoComplete id="proprietario" styleClass="grid_20 autocompleteProprietario" dropdown="true" converter="proprietarioconverter"
                                                    var="proprietario"
                                                    itemLabel="#{proprietario.nome != null ? proprietario.nome.concat(' - ').concat(managerUtilitario.mascaraCpfCnpj(proprietario)) :
                                                                 proprietario.nomeFantasia.concat(' - ').concat(managerUtilitario.mascaraCpfCnpj(proprietario))}"
                                                    style="margin-top: -2px"
                                                    itemValue="#{proprietario}" value="#{managerCriarImovel.proprietario}"
                                                    scrollHeight="200" forceSelection="true" immediate="true"
                                                    completeMethod="#{managerUtilitario.autocompletePessoa}"/>
                                    <p:commandButton oncomplete="dlgProp.show()" icon="ui-icon-plus" style="margin-top: -1px"
                                                     update=":proprietarioForm" actionListener="#{managerProprietario.init()}"/>
                                    <div class="buttonAction">
                                        <p:commandButton value="Adicionar"
                                                         process="proprietarioPanel"
                                                         actionListener="#{managerCriarImovel.addProprietario()}"
                                                         update="proprietarioPanel, tableProprietario"
                                                         id="addOnwerCommandButton" icon="ui-icon-plus"/>
                                    </div>
                                    <div class="clear"/> 
                                </div>

                                <p:dataTable id="tableProprietario" var="item" value="#{managerCriarImovel.imovel.proprietarios}" 
                                             styleClass="grid_24" emptyMessage="Nenhum registro">  
                                    <f:facet name="header">
                                        Nome do Proprietário ou Detentor
                                    </f:facet>

                                    <p:column headerText="Ação" width="50" style="text-align: center">
                                        <p:commandButton oncomplete="dlgProp.show()" icon="ui-icon-search"
                                                         update=":proprietarioForm">
                                            <f:setPropertyActionListener target="#{managerProprietario.proprietario}" value="#{item}" />
                                            <f:setPropertyActionListener target="#{managerProprietario.readonly}" value="#{true}" />
                                        </p:commandButton>
                                        <p:commandButton  styleClass="optionButton" alt="Remover"
                                                          update=":realtyForm:tabView:proprietarioPanel, tableProprietario"
                                                          process="@this" icon="ui-icon-trash"
                                                          actionListener="#{managerCriarImovel.removerProprietario(item)}" />
                                    </p:column>

                                    <p:column headerText="Nome">  
                                        #{item.tipoDocumento eq 'CPF' ? item.nome : item.nomeFantasia}
                                    </p:column>

                                    <p:column headerText="Documento" width="60">  
                                        #{managerUtilitario.mascaraCpfCnpj(item)}
                                    </p:column> 

                                </p:dataTable>

                            </p:panel>
                        </fieldset>

                        <fieldset>
                            <legend>Localização Imóvel</legend>
                            <p:panel id="localPanel" styleClass="container_24 clearfix withoutBorder">

                                <p:outputLabel value="CEP" styleClass="grid_3" for="cepInputMask" />
                                <p:inputMask id="cepInputMask" styleClass="grid_4" mask="99.999-999" autocomplete="false" 
                                             value="#{managerCriarImovel.imovel.enderecoImovel.cep}" >
                                    <p:ajax event="blur" update=":realtyForm:tabView:localPanel"
                                            listener="#{managerCriarImovel.existeEnderecoImovel()}" />
                                </p:inputMask>

                                <p:outputLabel value="Usar este endereço para correspondência" for="enderecoSelectBooleanCheckbox" />
                                <p:selectBooleanCheckbox id="enderecoSelectBooleanCheckbox" styleClass="grid_1"
                                                         value="#{managerCriarImovel.usarMesmoEndereco}" >
                                    <p:ajax event="change" update=":realtyForm:tabView:endCorrespondenciaPanel"
                                            listener="#{managerCriarImovel.usarEnderecoParaCorrespondencia()}" />
                                </p:selectBooleanCheckbox>
                                <div class="clear-both" />

                                <p:outputLabel value="Logradouro" styleClass="grid_3 logradouroLabelImovel" 
                                               style="width: 90px; margin-left: 4px" for="patioInputText" />
                                <p:inputText id="patioInputText" styleClass="grid_19" 
                                             readonly="#{managerCriarImovel.disableEnderecoImovel}"
                                             value="#{managerCriarImovel.imovel.enderecoImovel.nomeclog}" />
                                <div class="clear"/>

                                <p:outputLabel value="Bairro" styleClass="grid_3" for="neighborhoodInputText" />
                                <p:autoComplete id="neighborhoodInputText" styleClass="grid_20"  dropdown="true" converter="bairroconverter"   
                                                var="bairro" itemLabel="#{bairro.nome}" 
                                                itemValue="#{bairro}" value="#{managerCriarImovel.imovel.enderecoImovel.bairroDne}"
                                                scrollHeight="200" forceSelection="true"
                                                completeMethod="#{managerUtilitario.autocompleteBairroPorCidade}" />

                                <p:outputLabel value="Número" styleClass="grid_3" for="numInputText" />
                                <p:inputText id="numInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.enderecoImovel.numero}" />

                                <p:outputLabel value="Complemento" styleClass="grid_5 alpha" for="compInputText" />
                                <p:inputText id="compInputText" styleClass="grid_10"
                                             value="#{managerCriarImovel.imovel.enderecoImovel.compl}" />

                            </p:panel>
                        </fieldset>
                        <!--                        <h4 class="title">Endereço Correspondência</h4>-->

                        <fieldset>
                            <legend>Endereço Correspondência</legend>

                            <p:panel id="endCorrespondenciaPanel" styleClass="container_24 clearfix withoutBorder">

                                <p:outputLabel value="CEP" styleClass="grid_3" for="endcepInputMask" />
                                <p:inputMask id="endcepInputMask" styleClass="grid_4" mask="99.999-999" autocomplete="false"
                                             disabled="#{managerCriarImovel.disabilitarEnderecoCorrespondencia()}"
                                             value="#{managerCriarImovel.imovel.enderecoCorrespondencia.cep}" >
                                    <p:ajax event="blur" update=":realtyForm:tabView:endCorrespondenciaPanel"  
                                            listener="#{managerCriarImovel.existeEnderecoCorrespondencia()}" />
                                </p:inputMask>
                                <div class="clear-both" />

                                <p:outputLabel value="Logradouro" styleClass="grid_3 logradouroLabelImovel" 
                                               style="width: 90px; margin-left: 4px" for="endpatioInputText" />
                                <p:inputText id="endpatioInputText" styleClass="grid_19"
                                             disabled="#{managerCriarImovel.disabilitarEnderecoCorrespondencia()}"
                                             value="#{managerCriarImovel.imovel.enderecoCorrespondencia.nomeclog}" />

                                <div class="clear"/>
                                <p:outputLabel value="Bairro" styleClass="grid_3" for="endneighborhoodInputText" />
                                <p:autoComplete id="endneighborhoodInputText" styleClass="grid_20"  dropdown="true" converter="bairroconverter"   
                                                var="bairro" itemLabel="#{bairro.nome}" 
                                                itemValue="#{bairro}" value="#{managerCriarImovel.imovel.enderecoCorrespondencia.bairroDne}"
                                                disabled="#{managerCriarImovel.disabilitarEnderecoCorrespondencia()}"
                                                scrollHeight="200" forceSelection="true"
                                                completeMethod="#{managerUtilitario.autocompleteBairroPorCidade}" />

                                <p:outputLabel value="Número" styleClass="grid_3" for="endnumInputText" />
                                <p:inputText id="endnumInputText" styleClass="grid_4" 
                                             disabled="#{managerCriarImovel.disabilitarEnderecoCorrespondencia() and managerCriarImovel.usarMesmoEndereco}"
                                             value="#{managerCriarImovel.imovel.enderecoCorrespondencia.numero}" />

                                <p:outputLabel value="Complemento" styleClass="grid_5 alpha" for="endcompInputText" />
                                <p:inputText id="endcompInputText" styleClass="grid_10"
                                             disabled="#{managerCriarImovel.disabilitarEnderecoCorrespondencia() and managerCriarImovel.usarMesmoEndereco}"
                                             value="#{managerCriarImovel.imovel.enderecoCorrespondencia.compl}" />

                            </p:panel>
                        </fieldset>

                        <fieldset>
                            <legend>Georreferenciamento</legend>

                            <p:panel id="geoPanel" styleClass="container_24 clearfix withoutBorder">
                                <p:gmap rendered="#{!managerLayout.desabilitarMapa() and managerCriarImovel.connect}"
                                        center="#{managerCriarImovel.center}"
                                        zoom="#{managerCriarImovel.zoom}" type="ROADMAP"
                                        styleClass="gmapImovel" model="#{managerCriarImovel.mapModel}">   

                                    <p:ajax event="stateChange" listener="#{managerCriarImovel.onStateChange}"/>
                                    <p:ajax event="pointSelect" update=":realtyForm:tabView:geoPanel" listener="#{managerCriarImovel.handlePointClick}" />
                                    <p:ajax event="markerDrag" update=":realtyForm:tabView:geoPanel" listener="#{managerCriarImovel.onMarkerDrag}" />
                                </p:gmap>

                                <div style="float: left; margin-top: -37px; margin-left: 75px;">
                                    <p:commandButton value="Remover ponto" icon="ui-icon-trash" 
                                                     rendered="#{!managerLayout.desabilitarMapa() and managerCriarImovel.connect}"
                                                     update=":realtyForm:tabView:geoPanel" process="@this"
                                                     actionListener="#{managerCriarImovel.removerCoordenada()}"
                                                     style="font-size: 12px; width: 140px !important"
                                                     styleClass="ui-priority-primary" />
                                </div>

                                <p:outputLabel value="O Georreferenciamento foi desabilitado pois não foi possível estabelecer uma conexão com a Internet !"
                                               rendered="#{!managerLayout.desabilitarMapa() and !managerCriarImovel.connect}"/>

                                <p:outputLabel value="O Georreferenciamento foi desabilitado pelo administrador do sistema !"
                                               rendered="#{managerLayout.desabilitarMapa()}"/>
                            </p:panel>
                        </fieldset>
                    </p:tab>

                    <p:tab id="tab1" title="Sócio-Econômico">

                        <h4 class="title">Informações Sobre o Imóvel</h4>
                        <fieldset>
                            <legend>Patrimônio</legend>                        
                            <div class="clear"/>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.patrimonio}">
                                <f:selectItems value="#{managerUtilitario.patrimonioList}"  />
                                <p:ajax event="change" update=":realtyForm:tabView:patrimonioUniaoPanelGrid" 
                                        listener="#{managerCriarImovel.eventChangePatrimonioUniao()}" />
                            </p:selectOneRadio>

                        </fieldset>

                        <div class="clear-both"/>
                        <p:panel id="patrimonioUniaoPanelGrid" style="width: 102%; margin-left: -15px"
                                 styleClass="#{managerCriarImovel.imovel.patrimonio ne 'UNIAO' ? 'invisible' : 'panelGrid'} withoutBorder">
                            <fieldset>
                                <legend>RIP</legend>
                                <p:outputLabel value="Número" styleClass="grid_3" for="codRip" />
                                <p:inputText id="codRip" styleClass="grid_20" value="#{managerCriarImovel.imovel.rip}" />
                            </fieldset>

                            <fieldset>
                                <legend>Rip: é em nome do proprietário atual ?</legend>
                                <p:selectOneRadio styleClass="grid_3" layout="pageDirection" 
                                                  value="#{managerCriarImovel.imovel.ripNomeCadastrado}" >
                                    <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                    <f:selectItem itemLabel="Não" itemValue="false" />
                                </p:selectOneRadio>
                            </fieldset>

                            <fieldset>
                                <legend>O proprietário é falecido ?</legend>
                                <p:selectOneRadio styleClass="grid_3" layout="pageDirection" 
                                                  value="#{managerCriarImovel.imovel.titularFalecido}" >
                                    <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                    <f:selectItem itemLabel="Não" itemValue="false" />
                                </p:selectOneRadio>
                            </fieldset>

                            <fieldset>
                                <legend>Qual o vínculo do atual proprietário com o cadastro na SPU ?</legend>
                                <p:selectOneRadio styleClass="grid_3" layout="pageDirection" 
                                                  value="#{managerCriarImovel.imovel.vinculoTitularRip}" >
                                    <f:selectItems value="#{managerUtilitario.vinculoTitularRip}"/>
                                </p:selectOneRadio>
                            </fieldset>
                        </p:panel>

                        <fieldset>
                            <legend>Tipo de Documento</legend>               

                            <p:selectOneRadio styleClass="grid_3"  layout="pageDirection" value="#{managerCriarImovel.imovel.tipoDocumentoImovel}">
                                <f:selectItems value="#{managerUtilitario.tipoDocumentoImovel}"/>
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Possui Registro de Imóvel ?</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.regImovel}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>
                    </p:tab>

                    <p:tab id="tab2" title="Caracteristicas">

                        <h4 class="title">Caracteristicas do Imóvel</h4>

                        <fieldset>
                            <legend>Tipo de Ocupação</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection"  value="#{managerCriarImovel.imovel.ocupacao}">
                                <f:selectItems value="#{managerUtilitario.ocupacao}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Topografia do Terreno</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.topografia}">
                                <f:selectItems value="#{managerUtilitario.topografia}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Situação do Terreno</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.situacaoTerreno}">
                                <f:selectItems value="#{managerUtilitario.situacaoTerreno}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Pedologia</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.pedologia}">
                                <f:selectItems value="#{managerUtilitario.pedologia}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Utilização do Terreno</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.utilizacao}">
                                <f:selectItems value="#{managerUtilitario.utilizacao}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Isento IPTU</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.isentoIptu}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Isento TSU</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.isentoTsu}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Uso do Imóvel</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.usoImovel}">
                                <f:selectItems value="#{managerUtilitario.usoImovel}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Observação</legend>
                            <p:inputTextarea  value="#{managerCriarImovel.imovel.obs}"/>
                        </fieldset>
                        <div class="clear"/>

                    </p:tab>

                    <p:tab id="tab3" title="Edificação">

                        <h4 class="title">Informações Sobre a Edificação</h4>

                        <fieldset>
                            <legend>Caracterização do Imóvel</legend>

                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.caracterizacao}">
                                <f:selectItems value="#{managerUtilitario.caracterizacao}"/>
                            </p:selectOneRadio>

                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Revestimento Externo</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.revExterno}">
                                <f:selectItems value="#{managerUtilitario.revExterno}"/>
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Piso</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.piso}">
                                <f:selectItems value="#{managerUtilitario.piso}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Forro</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.forro}">
                                <f:selectItems value="#{managerUtilitario.forro}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Cobertura</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.cobertura}">
                                <f:selectItems value="#{managerUtilitario.cobertura}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Instalação Sanitária</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.instSanitaria}">
                                <f:selectItems value="#{managerUtilitario.instSanitaria}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Posição do Imóvel</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.posicao}">
                                <f:selectItems value="#{managerUtilitario.posicao}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Construção</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.tipoConstrucao}">
                                <f:selectItems value="#{managerUtilitario.tipoConstrucao}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Estrutura do Imóvel</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.estrutura}">
                                <f:selectItems value="#{managerUtilitario.estrutura}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                        <fieldset>
                            <legend>Estado de Conservação do Imóvel</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.estadoConservacao}">
                                <f:selectItems value="#{managerUtilitario.estadoConservacao}"/>
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Tipo de Instalações Elétrica</legend>

                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.instalacoesEletricas}">
                                <f:selectItems value="#{managerUtilitario.instalacoesEletrica}"/>
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Fachada</legend>
                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.fachada}">
                                <f:selectItems value="#{managerUtilitario.fachada}"/>
                            </p:selectOneRadio>
                        </fieldset>

                        <div class="clear"/>

                    </p:tab>
                    <p:tab id="tab4" title="Serviços">

                        <h4 class="title">Serviços Urbanos</h4>

                        <fieldset>
                            <legend>Tipo Pavimentação</legend>

                            <p:selectOneMenu id="tipoPavimentacao" panelStyle="width:150px;" style="width: 50% !important; margin-left: 60px"
                                             value="#{managerCriarImovel.imovel.tipoPavimentacao}">
                                <f:selectItem itemLabel="" itemValue="" />
                                <f:selectItems value="#{managerUtilitario.tipoPavimentacao}"/>
                            </p:selectOneMenu>

                        </fieldset>
                        <div class="clear"/>
                        <fieldset>
                            <legend>Iluminação Pública</legend>

                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.iluminacaoPublica}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Limpeza Pública</legend>

                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.limpezaPublica}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Coleta de Lixo</legend>

                            <p:selectOneRadio styleClass="grid_3" layout="pageDirection" value="#{managerCriarImovel.imovel.coletaLixo}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>
                        <div class="clear"/>

                    </p:tab>

                    <p:tab id="tabSPU" title="SPU">
                        <h4 class="title">SPU</h4>

                        <fieldset>
                            <legend>Sistema de água</legend>

                            <p:outputLabel value="Tipo" styleClass="grid_3" for="sistemaAgua" />
                            <p:selectOneMenu id="sistemaAgua" panelStyle="width:150px;" 
                                             style="width: 50% !important; margin-left: 20px"
                                             value="#{managerCriarImovel.imovel.sistemaAgua}">
                                <f:selectItem itemLabel="" itemValue="" />
                                <f:selectItems value="#{managerUtilitario.sistemaAgua}"/>
                            </p:selectOneMenu>
                        </fieldset>

                        <fieldset>
                            <legend>Saneamento Basico</legend>

                            <p:outputLabel value="Tipo" styleClass="grid_3" for="saneamentoBasico" />
                            <p:selectOneMenu id="saneamentoBasico" panelStyle="width:150px;" 
                                             style="width: 50% !important; margin-left: 20px"
                                             value="#{managerCriarImovel.imovel.saneamentoBasico}">
                                <f:selectItem itemLabel="" itemValue="" />
                                <f:selectItems value="#{managerUtilitario.saneamentoBasico}"/>
                            </p:selectOneMenu>
                        </fieldset>

                        <fieldset>
                            <legend>Recebe outro benefício do Governo Federeal</legend>

                            <p:selectOneRadio styleClass="grid_3" value="#{managerCriarImovel.imovel.recebeOutroBeneficioGovernoFederal}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                            </p:selectOneRadio>
                        </fieldset>

                        <fieldset>
                            <legend>Pessoas com necessidades especiais</legend>

                            <p:selectOneRadio styleClass="grid_3" value="#{managerCriarImovel.imovel.pessoasComNecessidadesEspeciais}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                                <p:ajax event="change" update="pessoaNecessidadeEspecialPanel" />
                            </p:selectOneRadio>

                            <p:panel id="pessoaNecessidadeEspecialPanel" styleClass="container_24"
                                     style="#{managerCriarImovel.imovel.pessoasComNecessidadesEspeciais eq false or 
                                              managerCriarImovel.imovel.pessoasComNecessidadesEspeciais eq null ? 'display: none' : ''}">

                                <p:outputLabel styleClass="grid_3 pessoaNecessidadeEspecialQuantidadeLabel" value="Quantidade" 
                                               for="pessoaNecessidadeEspecialQuantidade" />
                                <p:inputText id="pessoaNecessidadeEspecialQuantidade" styleClass="grid_4" 
                                             value="#{managerCriarImovel.imovel.pessoasComNecessidadesEspeciaisQuantidade}"/>

                            </p:panel>
                        </fieldset>

                        <fieldset>
                            <legend>Pessoas com morbidade</legend>

                            <p:selectOneRadio styleClass="grid_3" value="#{managerCriarImovel.imovel.pessoasComMorbidade}">
                                <f:selectItem itemLabel="Sim" itemValue="true" /> 
                                <f:selectItem itemLabel="Não" itemValue="false" />
                                <p:ajax event="change" update="pessoaMorbidadePanel" />
                            </p:selectOneRadio>


                            <p:panel id="pessoaMorbidadePanel" styleClass="container_24"
                                     style="#{managerCriarImovel.imovel.pessoasComMorbidade eq false or 
                                              managerCriarImovel.imovel.pessoasComMorbidade eq null ? 'display: none' : ''}">

                                <p:outputLabel styleClass="grid_5 alpha pessoaMorbidadeTipoLabel" value="Tipo" for="pessoaMorbidadeTipo" />
                                <p:inputText id="pessoaMorbidadeTipo" styleClass="grid_10" 
                                             value="#{managerCriarImovel.imovel.pessoasComMorbidadeTipo}"/>

                            </p:panel>
                        </fieldset>

                    </p:tab>

                    <p:tab id="tab5" title="Dimensões" >
                        <h4 class="title">Dimensões e Confrontações</h4>

                        <fieldset>
                            <legend>Frente</legend>
                            <p:panel id="frenteDimensao" styleClass="container_24 clearfix">
                                <p:outputLabel value="Para" styleClass="grid_3" for="frenteInputText" />
                                <p:inputText id="frenteInputText" styleClass="grid_18"
                                             value="#{managerCriarImovel.imovel.frente}" />

                                <div class="clear"/>
                                <p:outputLabel value="Limitando" styleClass="grid_3 dimensaoLabelImovel" for="frenteRuaInputText" />
                                <p:inputText id="frenteRuaInputText" styleClass="grid_18"
                                             value="#{managerCriarImovel.imovel.frenteRua}" />
                                <div class="clear"/>
                                <p:outputLabel value="Medindo" styleClass="grid_3 dimensaoLabelImovel" for="frenteMedInputText" />
                                <p:inputText id="frenteMedInputText" styleClass="grid_18"
                                             value="#{managerCriarImovel.imovel.frenteMedindo}" 
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                    <p:ajax event="change" update=":realtyForm:tabView:frenteDimensao"/>
                                </p:inputText>

                                <p:selectBooleanButton id="frenteMedindoLinhasQuebradas" styleClass="booleanButtonLinhaQuebrada"
                                                       onIcon="ui-icon-grip-dotted-vertical"
                                                       offIcon="ui-icon-grip-dotted-vertical"
                                                       value="#{managerCriarImovel.imovel.frenteMedindoEmLinhasQuebradas}"
                                                       onLabel="." offLabel="." style="width:60px"
                                                       rendered="#{managerCriarImovel.imovel.frenteMedindo ne null}"/>
                                <p:tooltip for="frenteMedindoLinhasQuebradas" value="Linhas quebradas !"/>
                            </p:panel>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Lado Direito</legend>
                            <p:panel id="ladoDireitoDimensao" styleClass="container_24 clearfix">
                                <p:outputLabel value="Para" styleClass="grid_3" for="direitoParaInputText" />
                                <p:inputText id="direitoParaInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoDireito}" />
                                <div class="clear"/>

                                <p:outputLabel value="Limitando" styleClass="grid_3 dimensaoLabelImovel" for="direitoRuaInputText" />
                                <p:inputText id="direitoRuaInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoDireitoRua}" />
                                <div class="clear"/>

                                <p:outputLabel value="Medindo" styleClass="grid_3 dimensaoLabelImovel" for="direitoMedInputText" />
                                <p:inputText id="direitoMedInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoDireitoMedindo}" 
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                    <p:ajax event="change" update=":realtyForm:tabView:ladoDireitoDimensao"/>
                                </p:inputText>

                                <p:selectBooleanButton id="ladoDireitoMedindoLinhasQuebradas" styleClass="booleanButtonLinhaQuebrada"
                                                       onIcon="ui-icon-grip-dotted-vertical"
                                                       offIcon="ui-icon-grip-dotted-vertical"
                                                       value="#{managerCriarImovel.imovel.ladoDireitoMedindoEmLinhasQuebradas}"
                                                       onLabel="." offLabel="." style="width:60px"
                                                       rendered="#{managerCriarImovel.imovel.ladoDireitoMedindo ne null}"/>
                                <p:tooltip for="ladoDireitoMedindoLinhasQuebradas" value="Linhas quebradas !"/>
                            </p:panel>
                            <div class="clear"/>
                        </fieldset>

                        <fieldset><legend>Lado Esquerdo</legend>
                            <p:panel id="ladoEsquerdoDimensao" styleClass="container_24 clearfix">
                                <p:outputLabel value="Para" styleClass="grid_3" for="esquerdoInputText" />
                                <p:inputText id="esquerdoInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoEsquerdo}" />
                                <div class="clear"/>

                                <p:outputLabel value="Limitando" styleClass="grid_3 dimensaoLabelImovel" for="esquerdoRuaInputText" />
                                <p:inputText id="esquerdoRuaInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoEsquerdoRua}" />
                                <div class="clear"/>

                                <p:outputLabel value="Medindo" styleClass="grid_3 dimensaoLabelImovel" for="esquerdoMedInputText" />
                                <p:inputText id="esquerdoMedInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.ladoEsquerdoMedindo}"   
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                    <p:ajax event="change" update=":realtyForm:tabView:ladoEsquerdoDimensao"/>
                                </p:inputText>

                                <p:selectBooleanButton id="ladoEsquerdoMedindoLinhasQuebradas" styleClass="booleanButtonLinhaQuebrada"
                                                       onIcon="ui-icon-grip-dotted-vertical"
                                                       offIcon="ui-icon-grip-dotted-vertical"
                                                       value="#{managerCriarImovel.imovel.ladoEsquerdoMedindoEmLinhasQuebradas}"
                                                       onLabel="." offLabel="." style="width:60px"
                                                       rendered="#{managerCriarImovel.imovel.ladoEsquerdoMedindo ne null}"/>
                                <p:tooltip for="ladoEsquerdoMedindoLinhasQuebradas" value="Linhas quebradas !"/>
                            </p:panel>
                            <div class="clear"/>
                        </fieldset>

                        <fieldset><legend>Fundo</legend>
                            <p:panel id="fundoDimensao" styleClass="container_24 clearfix">
                                <p:outputLabel value="Para" styleClass="grid_3" for="fundoInputText" />
                                <p:inputText id="fundoInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.fundo}" />
                                <div class="clear"/>
                                <p:outputLabel value="Limitando" styleClass="grid_3 dimensaoLabelImovel" for="fundoRuaInputText" />
                                <p:inputText id="fundoRuaInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.fundoRua}" />
                                <div class="clear"/>
                                <p:outputLabel value="Medindo" styleClass="grid_3 dimensaoLabelImovel" for="fundoMedInputText" />
                                <p:inputText id="fundoMedInputText" styleClass="grid_18" 
                                             value="#{managerCriarImovel.imovel.fundoMedindo}" 
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                    <p:ajax event="change" update=":realtyForm:tabView:fundoDimensao"/>
                                </p:inputText>

                                <p:selectBooleanButton id="fundoMedindoLinhasQuebradas" styleClass="booleanButtonLinhaQuebrada"
                                                       onIcon="ui-icon-grip-dotted-vertical"
                                                       offIcon="ui-icon-grip-dotted-vertical"
                                                       value="#{managerCriarImovel.imovel.fundoMedindoEmLinhasQuebradas}"
                                                       onLabel="." offLabel="." style="width:60px"
                                                       rendered="#{managerCriarImovel.imovel.fundoMedindo ne null}"/>
                                <p:tooltip for="fundoMedindoLinhasQuebradas" value="Linhas quebradas !"/>
                            </p:panel>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset><legend>Dimensões Terreno</legend>
                            <p:panel styleClass="container_24 clearfix withoutBorder">
                                <p:outputLabel value="Área Terreno" styleClass="grid_5" for="areaInputText" />
                                <p:inputText id="areaInputText" styleClass="grid_4" 
                                             value="#{managerCriarImovel.imovel.dimensoes.areaTerreno}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <p:outputLabel value="Área Unidade" styleClass="grid_5" for="areaUInputText" />
                                <p:inputText id="areaUInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.areaUnidade}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <div class="clear"/>
                                <p:outputLabel value="Área Total" styleClass="grid_5" for="areaTInputText" />
                                <p:inputText id="areaTInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.areaTotalEdificacao}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <p:outputLabel value="Perímetro" styleClass="grid_5" for="perimetroInputText" />
                                <p:inputText id="perimetroInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.perimetro}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <div class="clear"/>
                                <p:outputLabel value="N˚ Pavimento" styleClass="grid_5" for="areaPInputText" />
                                <p:inputText id="areaPInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.numPavimentacaoEdific}">
                                </p:inputText>
                            </p:panel>
                        </fieldset>
                        <div class="clear"/>

                        <fieldset>
                            <legend>Faces de Quadra</legend>

                            <p:panel id="faceQuadraAvancadoDados" styleClass="container_24 clearfix">

                                <p:outputLabel value="Bairro" styleClass="grid_3" for="bairro"/>
                                <p:autoComplete id="bairro" styleClass="grid_20" dropdown="true" converter="bairroconverter"
                                                var="bairro" itemLabel="#{bairro.nome}" style="margin-top: -2px"
                                                itemValue="#{bairro}" value="#{managerCriarImovel.bairro}"
                                                scrollHeight="200" forceSelection="true"
                                                completeMethod="#{managerCriarImovel.autocompleteBairroFaceQuadra}">
                                    <p:ajax event="itemSelect" update=":realtyForm:tabView:logradouro" />
                                </p:autoComplete>

                                <p:outputLabel value="Logradouro" styleClass="grid_3 logradouroLabelFaceQuadra" for="logradouro"/>
                                <p:autoComplete id="logradouro" styleClass="grid_20" dropdown="true" converter="facequadraconverter"
                                                var="face" itemLabel="#{face.dne.rua}" style="margin-top: -2px"
                                                itemValue="#{face}" value="#{managerCriarImovel.faceQuadra}"
                                                scrollHeight="200" forceSelection="true" immediate="true"
                                                completeMethod="#{managerCriarImovel.autocompleteFaceQuadra}"/>
                                <div class="clear"/>

                                <div class="buttonAction">
                                    <p:commandButton value="Adicionar"
                                                     actionListener="#{managerCriarImovel.addFaceQuadra()}"
                                                     update=":realtyForm:tabView:faceQuadraTable, :realtyForm:tabView:bairro, :realtyForm:tabView:logradouro"/>
                                    <p:commandButton value="Limpar" icon="ui-icon-clean"
                                                     actionListener="#{managerCriarImovel.limparFaceQuadra()}"
                                                     update=":realtyForm:tabView:bairro, :realtyForm:tabView:logradouro" process="@this" />
                                </div>

                                <br/>


                                <p:dataTable id="faceQuadraTable" var="item" value="#{managerCriarImovel.imovel.faceQuadras}" 
                                             styleClass="grid_24" rowIndexVar="rowid"
                                             rows="5" paginator="true" lazy="true"   
                                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
                                             currentPageReportTemplate="{currentPage} de {totalPages}"
                                             paginatorPosition="bottom" emptyMessage="Nenhum registro encontrado"
                                             style="white-space: pre-wrap;">

                                    <f:facet name="header">Faces de Quadra</f:facet>
                                    <p:column headerText="Ação" width="90">
                                        <p:commandButton  styleClass="optionButton" alt="Remover"
                                                          update=":realtyForm:tabView:faceQuadraTable"
                                                          process="@this" icon="ui-icon-trash"
                                                          actionListener="#{managerCriarImovel.removerFaceQuadra(item)}" />
                                    </p:column>

                                    <p:column headerText="Setor" width="50">
                                        <h:outputText value="#{item.quadra.setor.numero}"/>
                                    </p:column>
                                    <p:column headerText="Quadra" width="50">
                                        <h:outputText value="#{item.quadra.numero}"/>
                                    </p:column>
                                    <p:column headerText="UFMP" width="90">
                                        <h:outputText value="#{item.valorUfmp}"/>
                                    </p:column>
                                    <p:column headerText="Bairro">
                                        <h:outputText value="#{item.dne.bairro.nome}"/>
                                    </p:column>
                                    <p:column headerText="Logradouro">
                                        <h:outputText value="#{item.dne.rua}"/>
                                    </p:column>

                                </p:dataTable>

                            </p:panel>
                        </fieldset>

                        <fieldset><legend>Testada</legend>
                            <p:panel styleClass="container_24 clearfix withoutBorder">
                                <p:outputLabel value="Testada do Imóvel"  styleClass="grid_7" for="areaTiInputText" />
                                <p:inputText id="areaTiInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.testadaImovel}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <p:outputLabel value="Servida Conservação Calçamento" 
                                               styleClass="grid_8" for="areaTSInputText" />
                                <p:inputText id="areaTSInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.testadaServidaConservCalcamento}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <div class="clear"/>
                                <p:outputLabel value="Servida Iluminação Pública"  styleClass="grid_7" for="areaTIInputText" />
                                <p:inputText id="areaTIInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.testadaServidaPorIluminacaoPublica}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>

                                <p:outputLabel value="Servida Limpeza Pública"  styleClass="grid_8" for="areaTLInputText" />
                                <p:inputText id="areaTLInputText" styleClass="grid_4"
                                             value="#{managerCriarImovel.imovel.dimensoes.testadaServidaLimpezaPublica}"
                                             onkeypress="jQuery(this).autoNumeric({aSep: '.', aDec: ','} );">
                                    <f:convertNumber pattern="#,###,##0.00" locale="pt,BR"/>
                                </p:inputText>
                            </p:panel>
                        </fieldset>

                        <fieldset>
                            <legend>Inserir Dados das Coordenadas</legend>

                            <p:panel id="georefPanel" styleClass="container_24 clearfix withoutBorder">
                                <p:gmap rendered="#{!managerLayout.desabilitarMapa() and managerCriarImovel.connect}"
                                        center="#{managerCriarImovel.centerDimensao}" 
                                        zoom="#{managerCriarImovel.zoomDimensao}" type="HYBRID"
                                        styleClass="gmapImovel" model="#{managerCriarImovel.mapModelDimensao}">

                                    <p:ajax event="stateChange" listener="#{managerCriarImovel.onStateChangeDimensao}"/>
                                    <p:ajax event="pointSelect" listener="#{managerCriarImovel.handlePointClickDimensao}" 
                                            update=":realtyForm:tabView:georefPanel, :realtyForm:tabView:georefCoordenadasPanel"/>
                                    <p:ajax event="markerDrag" listener="#{managerCriarImovel.onMarkerDragDimensao}"
                                            update=":realtyForm:tabView:georefPanel, :realtyForm:tabView:georefCoordenadasPanel"/>

                                    <p:ajax event="overlaySelect" listener="#{managerCriarImovel.visualizarCoordenadaMapa}"/>

                                    <p:gmapInfoWindow id="infoWindow">
                                        <p:outputPanel style="display: block; margin: auto; width: 110px">

                                            <p:outputLabel value="Ponto" for="pontoTexto" style="font-weight: bold; color: #737373" />
                                            <p:outputLabel id="pontoTexto" value="#{'  '.concat(managerCriarImovel.visuCoordenada.ponto)}" />
                                            <div class="clear"/>

                                            <p:outputLabel value="N" for="norteTexto" style="font-weight: bold; color: #737373"/>
                                            <p:outputLabel id="norteTexto" value="#{'  '.concat(managerCriarImovel.visuCoordenada.convN)}" />
                                            <div class="clear"/>

                                            <p:outputLabel value="E" for="lesteTexto" style="font-weight: bold; color: #737373"/>
                                            <p:outputLabel id="lesteTexto" value="#{'  '.concat(managerCriarImovel.visuCoordenada.convE)}" />
                                            <div class="clear"/>

                                            <p:outputLabel value="Distância" for="disTexto" style="font-weight: bold; color: #737373"/>
                                            <p:outputLabel id="disTexto" value="#{'  '.concat(managerCriarImovel.visuCoordenada.distancia)}" />
                                            <div class="clear"/>

                                            <p:outputLabel value="Limite" for="limTexto" style="font-weight: bold; color: #737373"/>
                                            <p:outputLabel id="limTexto" value="#{'  '.concat(managerCriarImovel.visuCoordenada.limite)}" />
                                            <div class="clear"/>

                                            <div style="float: right; margin-right: -10px; right: 0; position: absolute;" >
                                                <p:commandLink title="Editar" style="font-size: 1.33333em !important"
                                                               disabled="#{managerCriarImovel.editandoCoordenada}"
                                                               styleClass="fa fa-pencil-square-o fa-lg acaorapida" process="@this"
                                                               actionListener="#{managerCriarImovel.editarCoordenada(managerCriarImovel.visualizarCoordenada)}"
                                                               update=":realtyForm:tabView:georefPanel
                                                               :realtyForm:tabView:georefCoordenadasPanel
                                                               :realtyForm:tabView:coordenadaAvancadoDados"/>

                                                <p:commandLink title="Remover" style="font-size: 1.33333em !important" 
                                                               disabled="#{managerCriarImovel.editandoCoordenada}"
                                                               styleClass="fa fa-trash-o fa-lg acaorapida" process="@this"
                                                               actionListener="#{managerCriarImovel.setCoordenadaRemover(managerCriarImovel.visualizarCoordenada)}"
                                                               oncomplete="dlgCoordenada.show()"/>
                                            </div>
                                            <br/>

                                        </p:outputPanel>
                                    </p:gmapInfoWindow>

                                </p:gmap>

                                <div style="float: left; margin-top: -37px; margin-left: 75px;">
                                    <p:commandButton value="Remover pontos" icon="ui-icon-trash" 
                                                     rendered="#{!managerLayout.desabilitarMapa() and managerCriarImovel.connect}"
                                                     update=":realtyForm:tabView:georefPanel
                                                     :realtyForm:tabView:georefCoordenadasPanel
                                                     :realtyForm:tabView:coordenadaAvancadoDados"
                                                     process="@this" oncomplete="coordenadaAvancado.toggle()"
                                                     actionListener="#{managerCriarImovel.removerPontosCoordenadaDimensao()}"
                                                     style="font-size: 12px; width: 140px !important"
                                                     styleClass="ui-priority-primary" />
                                </div>

                                <p:outputLabel value="O Georreferenciamento foi desabilitado pois não foi possível estabelecer uma conexão com a Internet !"
                                               rendered="#{!managerLayout.desabilitarMapa() and !managerCriarImovel.connect}"/>

                                <p:outputLabel value="O Georreferenciamento foi desabilitado pelo administrador do sistema !"
                                               rendered="#{managerLayout.desabilitarMapa()}"/>
                            </p:panel>

                            <p:panel id="coordenadaAvancadoDados" styleClass="container_24 clearfix" header="Avançado"
                                     toggleable="true" collapsed="#{managerCriarImovel.panelCollapsed}" >

                                <p:outputLabel value="Ponto" styleClass="grid_3" for="pontoText" />
                                <p:inputText id="pontoText" styleClass="grid_19" value="#{managerCriarImovel.coordenada.ponto}" />
                                <div class="clear"/>

                                <p:outputLabel value="N" styleClass="grid_3" for="norteText">
                                    <span class="ui-outputlabel-rfi required">*</span>
                                </p:outputLabel>
                                <p:inputText id="norteText" styleClass="grid_8" 
                                             value="#{managerCriarImovel.coordenada.convN}" />

                                <p:outputLabel value="E" styleClass="grid_3 alpha distanciaLabelImovel" for="lesteText">
                                    <span class="ui-outputlabel-rfi required">*</span>
                                </p:outputLabel>
                                <p:inputText id="lesteText" styleClass="grid_8" 
                                             value="#{managerCriarImovel.coordenada.convE}" />
                                <div class="clear"/>

                                <p:outputLabel value="Azimute" styleClass="grid_3" for="azimuteText" />
                                <p:inputText id="azimuteText" styleClass="grid_8" value="#{managerCriarImovel.coordenada.azimute}" />

                                <p:outputLabel value="Distância" styleClass="grid_3 alpha distanciaLabelImovel" for="disText" />
                                <p:inputText id="disText" styleClass="grid_8" value="#{managerCriarImovel.coordenada.distancia}" />

                                <p:outputLabel value="Limite" styleClass="grid_3" for="limText" />
                                <p:inputTextarea id="limText"  styleClass="grid_19" value="#{managerCriarImovel.coordenada.limite}" />
                                <br/>
                                <br/>
                                <div class="buttonAction">
                                    <p:commandButton id="bt_add" value="Adicionar" icon="ui-icon-plus"
                                                     process=":realtyForm:tabView:coordenadaAvancadoDados @this"
                                                     actionListener="#{managerCriarImovel.adicionarCoordenada()}"
                                                     styleClass="ui-priority-primary"/>

                                    <p:commandButton id="bt_clear" value="Limpar" icon="ui-icon-clean"
                                                     process="@this" actionListener="#{managerEditarimovel}"
                                                     rendered="#{!managerCriarImovel.editandoCoordenada}"
                                                     update=":realtyForm:tabView:coordenadaAvancadoDados">
                                        <p:resetInput target=":realtyForm:tabView:coordenadaAvancadoDados" />
                                    </p:commandButton>

                                    <p:commandButton id="bt_cancelar" value="Cancelar" icon="ui-icon-close"
                                                     update=":realtyForm:tabView:georefPanel, 
                                                     :realtyForm:tabView:georefCoordenadasPanel,
                                                     :realtyForm:tabView:coordenadaAvancadoDados"
                                                     process="@this"
                                                     rendered="#{managerCriarImovel.editandoCoordenada}"
                                                     actionListener="#{managerCriarImovel.adicionarCoordenada()}"/>
                                </div>

                            </p:panel>

                            <p:panel id="georefCoordenadasPanel" styleClass="container_24 clearfix withoutBorder">

                                <p:blockUI id="BLOCK" block="tableGeo" trigger="bt_add" > 
                                    <p:graphicImage value="media/images/ajax-loader.gif"/>
                                </p:blockUI> 

                                <p:dataTable id="tableGeo" var="item" value="#{managerCriarImovel.imovel.coordenadasDimensoes}" 
                                             styleClass="grid_24" rowIndexVar="rowid"
                                             rowKey="#{item.id}" rows="5" paginator="true"  
                                             paginatorPosition="bottom" emptyMessage="Nenhum registro">  
                                    <f:facet name="header">
                                        Coordenadas
                                    </f:facet>
                                    <p:column headerText="Ação" width="60">
                                        <p:commandButton title="Editar"
                                                         disabled="#{managerCriarImovel.editandoCoordenada}"
                                                         icon="ui-icon-pencil" process="@this"
                                                         update=":realtyForm:tabView:georefPanel
                                                         :realtyForm:tabView:georefCoordenadasPanel
                                                         :realtyForm:tabView:coordenadaAvancadoDados"
                                                         actionListener="#{managerCriarImovel.editarCoordenada(item)}"/>
                                        <p:commandButton title="Visualizar"
                                                         oncomplete="dlgVisu.show();" process="@this"
                                                         update=":dlgVisuForm:paneldlg, :dlgVisuForm:iddlg"
                                                         actionListener="#{managerCriarImovel.visualizarCoordenada(item)}"
                                                         icon="ui-icon-zoomin"/>
                                        <p:commandButton update="@this" title="Excluir" process="@this"
                                                         disabled="#{managerCriarImovel.editandoCoordenada}"
                                                         oncomplete="dlgCoordenada.show()"
                                                         icon="ui-icon-trash" >
                                            <f:setPropertyActionListener target="#{managerCriarImovel.coordenadaRemover}" value="#{item}" />
                                        </p:commandButton>
                                    </p:column>

                                    <p:column headerText="Ponto" width="150">  

                                        <h:outputText value="#{item.ponto}"/>

                                    </p:column>
                                    <p:column headerText="N UTM" width="150">  

                                        <h:outputText value="#{item.convN}"/>

                                    </p:column>
                                    <p:column headerText="E UTM" width="100">  

                                        <h:outputText value="#{item.convE}"/>

                                    </p:column> 

                                </p:dataTable>
                            </p:panel>
                        </fieldset>

                    </p:tab>

                    <p:tab id="tab6" title="Documentos">
                        <h4 class="title">Documentos</h4>

                        <p:panel id="documentoPanel" styleClass="container_24 clearfix withoutBorder">

                            <p:fileUpload id="fileUpload"   
                                          mode="advanced" label="Anexar"
                                          uploadLabel="Enviar"
                                          cancelLabel="Cancelar"
                                          fileUploadListener="#{managerCriarImovel.adicionarAnexo}"
                                          multiple="false" auto="true"
                                          allowTypes="/(\.|\/)(gif|jpe?g|png|pdf)$/"
                                          dragDropSupport="true"
                                          invalidFileMessage="Tipo de arquivo não suportado."
                                          invalidSizeMessage="Tamanho do arquivo não é suportado"
                                          immediate="true" update=":realtyForm:tabView:documentoPanel, :realtyForm:tabView:dlgAnexo"/>

                            <fieldset>
                                <legend>Anexos</legend>

                                <div class="my-simple-gallery" >
                                    <ui:repeat  value="#{managerCriarImovel.annexs}" var="a">
                                        <h:panelGroup rendered="#{!managerImagem.pdf(a)}" >
                                            <div class="grid_4">
                                                <p:commandButton id="removeButton" alt="Remover" styleClass="ui-button-only button-remove"
                                                                 style="margin-right: -17px !important;"
                                                                 icon="ui-icon-trash" update=":realtyForm:tabView:documentoPanel" 
                                                                 process=":realtyForm:tabView:documentoPanel"
                                                                 actionListener="#{managerCriarImovel.removerAnexo(a)}" />
                                                <p:commandButton id="editarButton" alt="Editar" styleClass="ui-button-only button-edit"
                                                                 icon="ui-icon-pencil" 
                                                                 update=":realtyForm:tabView:documentoPanel, :realtyForm:tabView:dlgEditarAnexo" 
                                                                 process=":realtyForm:tabView:documentoPanel" oncomplete="dlgEditarAnexo.show();"
                                                                 actionListener="#{managerCriarImovel.editarAnexo(a)}" />
                                                <figure itemprop="associatedMedia" style="width: 100%" 
                                                        onclick="initPhoto(); desabilitaEdicaoImagem(); processPanelGaleria();">
                                                    <a href="#{managerImagem.urlImagem(a)}" 
                                                       itemprop="contentUrl" data-size="#{managerImagem.widthHeight(a)}" pid="#{a.id}">
                                                        <img src="#{managerImagem.urlThumbnailImagem(a)}" 
                                                             itemprop="thumbnail" class="image"/>
                                                    </a>
                                                    <figcaption itemprop="caption description">#{a.nomeExibicao}</figcaption>
                                                </figure>
                                            </div>
                                        </h:panelGroup>
                                    </ui:repeat>
                                    <ui:repeat  value="#{managerCriarImovel.annexs}" var="a">
                                        <h:panelGroup rendered="#{managerImagem.pdf(a)}" >
                                            <div class="grid_4">
                                                <p:commandButton id="removeButton" alt="Remover" styleClass="ui-button-only button-remove"
                                                                 icon="ui-icon-trash" update=":realtyForm:tabView:documentoPanel" 
                                                                 process=":realtyForm:tabView:documentoPanel"
                                                                 actionListener="#{managerCriarImovel.removerAnexo(a)}" />
                                                <p:commandButton id="editarButton" alt="Editar" styleClass="ui-button-only button-edit"
                                                                 icon="ui-icon-pencil" 
                                                                 update=":realtyForm:tabView:documentoPanel, :realtyForm:tabView:dlgEditarAnexo" 
                                                                 process=":realtyForm:tabView:documentoPanel" oncomplete="dlgEditarAnexo.show();"
                                                                 actionListener="#{managerCriarImovel.editarAnexo(a)}" />
                                                <h:outputLink value="#{managerImagem.visualizarPdf(a)}" rendered="#{managerImagem.pdf(a)}"
                                                              title="#{a.nomeExibicao}" target="_blank">
                                                    <p:graphicImage styleClass="image grid_3 anexoImovel" url="#{managerImagem.urlPDF}"/>
                                                </h:outputLink>
                                            </div>
                                        </h:panelGroup>
                                    </ui:repeat>
                                </div>
                                <p:remoteCommand name="processPanelGaleria" update=":realtyForm:tabView:documentoPanel" process=":realtyForm:tabView:documentoPanel" />
                            </fieldset>
                        </p:panel>

                        <p:dialog id="dlgAnexo" width="640" widgetVar="dlgAnexo" modal="true" 
                                  header="Anexo" styleClass="container_24 clearfix" 
                                  closeOnEscape="true" closable="false" resizable="false" >

                            <p:outputLabel value="Nome" styleClass="grid_3" for="nomeAnexo"/>
                            <p:inputText id="nomeAnexo" value="#{managerCriarImovel.anexo.nomeExibicao}" styleClass="grid_20"/>
                            <div class="clear"/>

                            <p:outputLabel value="Tipo" styleClass="grid_3" for="tipoAnexo" />
                            <div class="grid_20">
                                <p:selectOneMenu id="tipoAnexo" panelStyle="width:150px;" 
                                                 value="#{managerCriarImovel.anexo.tipoAnexo}">
                                    <f:selectItem itemLabel="" itemValue="" />
                                    <f:selectItems value="#{managerUtilitario.tipoAnexo}"/>
                                </p:selectOneMenu>
                            </div>
                            <div class="clear"/>

                            <div class="buttonAction">
                                <p:commandButton value="Adicionar" actionListener="#{managerCriarImovel.adicionarAnexo()}"
                                                 update=":realtyForm:tabView:documentoPanel"
                                                 process=":realtyForm:tabView:dlgAnexo"
                                                 oncomplete="dlgAnexo.hide()" icon="ui-icon-check"/>
                                <p:commandButton value="Cancelar" actionListener="#{managerCriarImovel.removerAnexo()}"
                                                 oncomplete="dlgAnexo.hide()" icon="ui-icon-close"/>
                            </div>

                            <script>
                                $(document).ready(function() {
                                    $('#realtyForm\\:tabView\\:tipoAnexo_panel').removeAttr('style');
                                    $('#realtyForm\\:tabView\\:tipoAnexo_panel').css('width', 510);
                                    
                                });
                            </script>

                        </p:dialog>

                        <p:dialog id="dlgEditarAnexo" width="640" widgetVar="dlgEditarAnexo" modal="true" 
                                  header="Anexo" styleClass="container_24 clearfix" 
                                  closeOnEscape="true" closable="false" resizable="false" >

                            <p:outputLabel value="Nome" styleClass="grid_3" for="nomeAnexoEditar"/>
                            <p:inputText id="nomeAnexoEditar" value="#{managerCriarImovel.anexo.nomeExibicao}" styleClass="grid_20"/>
                            <div class="clear"/>

                            <p:outputLabel value="Tipo" styleClass="grid_3" for="tipoAnexoEditar" />
                            <div class="grid_20">
                                <p:selectOneMenu id="tipoAnexoEditar" panelStyle="width:150px;" 
                                                 value="#{managerCriarImovel.anexo.tipoAnexo}">
                                    <f:selectItem itemLabel="" itemValue="" />
                                    <f:selectItems value="#{managerUtilitario.tipoAnexo}"/>
                                </p:selectOneMenu>
                            </div>
                            <div class="clear"/>

                            <div class="buttonAction">
                                <p:commandButton value="Salvar" actionListener="#{managerCriarImovel.atualizarAnexo}"
                                                 update=":realtyForm:tabView:documentoPanel"
                                                 oncomplete="dlgEditarAnexo.hide()" icon="ui-icon-check"/>
                                <p:commandButton value="Cancelar" oncomplete="dlgEditarAnexo.hide()" icon="ui-icon-close"/>
                            </div>

                            <script>
                                $(document).ready(function() {
                                    $('#realtyForm\\:tabView\\:tipoAnexoEditar_panel').removeAttr('style');
                                    $('#realtyForm\\:tabView\\:tipoAnexoEditar_panel').css('width', 510);
                                });
                            </script>
                        </p:dialog>

                    </p:tab>

                </p:tabView>
                <div class="clear"/>

                <div class="buttonAction">
                    <p:commandButton id="bt_salvar" value="Salvar" icon="ui-icon-disk"
                                     widgetVar="btnSalvar"
                                     update=":enderecoChangeForm:endNovoPanel, :enderecoChangeForm:proprietariosPanel, @form"
                                     action="#{managerCriarImovel.salvar()}"
                                     styleClass="ui-priority-primary" />
                    <p:button href="pesquisarimovel.xhtml" value="Cancelar"  icon="ui-icon-trash" />
                </div>
                <br/><br/>

                <p:blockUI id="BLOCK" block=":realtyForm" trigger="bt_salvar" > 
                    <p:graphicImage value="media/images/ajax-loader.gif"/>
                </p:blockUI>
            </h:form>

            <h:form id="dlgVisuForm">
                <p:panel id="paneldlg" styleClass="container_24 clearfix ">
                    <p:dialog id="iddlg" header="Visualizar Dados" widgetVar="dlgVisu" modal="true" 
                              closeOnEscape="true" width="600" resizable="false" height="210">

                        <p:outputLabel value="Ponto" styleClass="grid_3" for="pontoText" />
                        <p:inputText id="pontoText" styleClass="grid_20" readonly="true"
                                     value="#{managerCriarImovel.visuCoordenada.ponto}" />
                        <div class="clear"/>

                        <p:outputLabel value="N" styleClass="grid_3" for="norteText" />
                        <p:inputText id="norteText" styleClass="grid_8" readonly="true"
                                     value="#{managerCriarImovel.visuCoordenada.convN}" />

                        <p:outputLabel value="E" styleClass="grid_4" for="lesteText" />
                        <p:inputText id="lesteText" styleClass="grid_7" style="width: 30%"
                                     readonly="true" value="#{managerCriarImovel.visuCoordenada.convE}" />
                        <div class="clear"/>

                        <p:outputLabel value="Azimute" styleClass="grid_3" for="azimuteText" />
                        <p:inputText id="azimuteText" styleClass="grid_8" readonly="true"
                                     value="#{managerCriarImovel.visuCoordenada.azimute}" />

                        <p:outputLabel value="Distância" styleClass="grid_4" for="disText" />
                        <p:inputText id="disText" styleClass="grid_7" style="width: 30%"
                                     readonly="true" value="#{managerCriarImovel.visuCoordenada.distancia}" />

                        <p:outputLabel value="Limite" styleClass="grid_3" for="limText" />
                        <p:inputTextarea id="limText" styleClass="grid_20" readonly="true"
                                         value="#{managerCriarImovel.visuCoordenada.limite}" />
                        <br/>

                        <div class="buttonAction">
                            <p:commandButton value="Fechar" process="@this" 
                                             onclick="dlgVisu.hide()" icon="ui-icon-circle-close" />
                        </div>

                    </p:dialog>
                </p:panel>
            </h:form>

            <!-- Dialog cadastro proprietario -->
            <h:form id="proprietarioForm" enctype="multipart/form-data">
                <p:dialog id="dlgProp" widgetVar="dlgProp" height="500" width="1000" appendToBody="false"
                          modal="true" styleClass="container_24 clearfix"
                          closeOnEscape="true" closable="true">

                    <br/>
                    <h3 class="title" style="#{managerProprietario.proprietario.id ne null ? 'display: none' : ''}" >Cadastrar Contribuinte</h3>
                    <h3 class="title" style="#{managerProprietario.proprietario.id ne null ? '' : 'display: none'}" >Contribuinte</h3>
                    <ui:include src="proprietarioform.xhtml"/>

                    <div class="buttonAction" style="#{managerProprietario.proprietario.id ne null ? 'display: none' : ''}">
                        <p:commandButton value="Salvar" icon="ui-icon-disk"
                                         actionListener="#{managerProprietario.save()}" oncomplete="addProp();"
                                         styleClass="ui-priority-primary" />
                        <p:remoteCommand name="addProp" update=":realtyForm:tabView:tableProprietario" actionListener="#{managerCriarImovel.addProprietario(managerProprietario.proprietarioSalvo)}" />

                        <p:commandButton value="Cancelar" icon="ui-icon-trash" 
                                         process="@this" oncomplete="dlgProp.hide()"/>
                    </div>

                    <script>
                        $(document).ready(function() {
                            $('#proprietarioForm\\:estadoCivilOutputlabel').removeClass('estadoCivilLabel');
                            $('#proprietarioForm\\:localTrabalhoOutputlabel').removeClass('localTrabalhoLabel');
                            $('#proprietarioForm\\:conjuge').removeClass('autocompleteConjuge');
                            $('#proprietarioForm\\:conjuge').addClass('autocompleteConjugeDlg');
                            $('#proprietarioForm\\:localTrabalhoOutputlabel').removeClass('localTrabalhoLabel');
                            $('#proprietarioForm\\:localTrabalhoOutputlabel').addClass('localTrabalhoLabelDlg');
                            $('#proprietarioForm\\:localTrabalhoInputText').removeClass('localTrabalhoInputTextContribuinte');
                            $('#proprietarioForm\\:localTrabalhoInputText').addClass('localTrabalhoInputTextContribuinteDlg');
                            $('#proprietarioForm\\:localTrabalhoInputText').addClass('alpha');
                        });
                    </script>
                </p:dialog>

            </h:form>
            <p:dialog id="modalDialog" widgetVar="dlgProprietario" height="510"
                      modal="true" styleClass="container_24 clearfix"
                      closeOnEscape="true" closable="false" resizable="false">

                <ui:include src="conjugedialogform.xhtml"/>

            </p:dialog>

            <h:form id="enderecoChangeForm" enctype="multipart/form-data">
                <p:dialog id="enderecoChangeDlg" widgetVar="enderecoChangeDlg" height="300" width="850"
                          modal="true" 
                          closeOnEscape="true" closable="false" resizable="false">

                    <h4 style="font-weight: bold;">Substituir o endereço dos proprietários pelo endereço deste imóvel?</h4>

                    <div style="width: 350px; float: left;">
                        <p:panel id="endNovoPanel" header="Endereço do Imóvel" styleClass="container_24 clearfix">
                            <p:outputLabel value="CEP" styleClass="grid_6" for="cepInputMask" />
                            <p:inputMask id="cepInputMask" styleClass="grid_17" mask="99.999-999"
                                         value="#{managerCriarImovel.endPropNovo.cep}" readonly="true" />
                            <p:outputLabel value="Lograd." styleClass="grid_6" 
                                           for="patioInputText" />
                            <p:inputText id="patioInputText" styleClass="grid_17" readonly="true"
                                         value="#{managerCriarImovel.endPropNovo.nomeclog eq null ? 
                                                  managerCriarImovel.endPropNovo.logradouro : managerCriarImovel.endPropNovo.nomeclog}" />
                            <p:outputLabel value="Bairro" styleClass="grid_6" for="neighborhoodInputText" />
                            <p:inputText id="neighborhoodInputText" styleClass="grid_17" readonly="true"
                                         value="#{managerCriarImovel.endPropNovo.bairroDne.nome}" />

                            <p:outputLabel value="Número" styleClass="grid_6" for="numInputText" />
                            <p:inputText id="numInputText" styleClass="grid_17" readonly="true"
                                         value="#{managerCriarImovel.endPropNovo.numero}" />

                            <p:outputLabel value="Compl." styleClass="grid_6" for="compInputText" />
                            <p:inputText id="compInputText" styleClass="grid_17" readonly="true"
                                         value="#{managerCriarImovel.endPropNovo.compl}" />
                        </p:panel>
                    </div>
                    <div style="width: 450px; float: left;">
                        <p:panel id="proprietariosPanel" header="Proprietários" styleClass="container_24 clearfix">
                            <div style="overflow-y: auto !important; height: 156px !important;">
                                <p:selectManyCheckbox id="grid" value="#{managerCriarImovel.proprietariosSelected}" layout="pageDirection" style="border: none !important;" converter="proprietarioconverter">
                                    <f:selectItems value="#{managerCriarImovel.proprietariosSelected}" var="proprietario" itemLabel="#{proprietario.nome}" itemValue="#{proprietario}" />
                                </p:selectManyCheckbox>
                            </div>
                        </p:panel>
                    </div>

                    <div class="clear"/>

                    <div class="buttonAction">
                        <p:commandButton value="Sim"
                                         actionListener="#{managerCriarImovel.alterarEnderecoProprietario()}"
                                         oncomplete="enderecoChangeDlg.hide()"
                                         update=":realtyForm"
                                         icon="ui-icon-check"/>
                        <p:commandButton value="Não"
                                         oncomplete="enderecoChangeDlg.hide();"
                                         actionListener="#{managerCriarImovel.cancelarEnderecoPropDlg()}"
                                         update=":realtyForm"
                                         icon="ui-icon-close" />
                    </div>
                </p:dialog>
            </h:form> 

            <h:form id="dlgDelForm">
                <p:panel id="paneldlg" style="background: none; border: none;" 
                         styleClass="container_24 clearfix ">
                    <p:dialog id="modalDialog" header="Confirmação de remoção" widgetVar="dlgdel" modal="true" 
                              height="80" closable="false" resizable="false" >
                        <h:outputText value="Tem certeza que deseja remover estes dados Geográficos ?" />
                        <div class="buttonAction">
                            <p:commandButton value="Sim"
                                             actionListener="#{managerCriarImovel.removerCoordenada()}"
                                             update="@form"
                                             icon="ui-icon-check"/>
                            <p:commandButton value="Não" icon="ui-icon-close"
                                             oncomplete="dlgdel.hide()" />
                        </div>
                    </p:dialog>

                </p:panel>

                <p:dialog id="coordenadaDialog" header="Confirmação de remoção" widgetVar="dlgCoordenada" modal="true" 
                          height="80" closable="true" resizable="false" closeOnEscape="true" >
                    <h:outputText value="Tem certeza que deseja remover este coordenada?" />
                    <div class="buttonAction">
                        <p:commandButton value="Sim"
                                         actionListener="#{managerCriarImovel.removerCoordenadaDimensao()}"
                                         update="@form, :realtyForm:tabView:georefPanel, 
                                         :realtyForm:tabView:georefCoordenadasPanel,
                                         :realtyForm:tabView:coordenadaAvancadoDados"
                                         icon="ui-icon-check"/>
                        <p:commandButton value="Não" icon="ui-icon-circle-close"
                                         oncomplete="dlgCoordenada.hide()" />

                    </div>
                </p:dialog>

            </h:form> 
        </ui:define>
    </ui:composition>

</html>
